package interfaces;

public class Applicator {
	public static void apply(Processor p ,Object s) {
		System.out.println("Using Processor"+p.name());
		System.out.println(p.process(s));
	}
	public Applicator() {
		// TODO 自动生成的构造函数存根
	}
	public static void main(String[] args) {
		String s = "we are such staff as dream are mode on ";
		apply(new Upcase(),s);
		apply(new Downcase(),s);
		apply(new Splitter(),s);
	}

}
